#include<iostream>

struct car
{
	char name[20];
	int year;
};
void InfoShow(car* c, int ct);

int main()
{
	int count;
	std::cout << "How many cars do you wish to catalog?";
	std::cin >> count;
	car* c = new car[count];
	for (int i = 0; i < count; i++)
	{
		std::cout << "Car #" << i+1 << ":"
			<< "\nPlease enter the make: ";
		std::cin.getline(c[i].name, 20);
		std::cout << "Please enter the year made: ";
		std::cin >> c[i].year;
		std::cin.get();
		std::cout << std::endl;
	}
	InfoShow(c, count);
	return 0;
}

void InfoShow(car* c, int ct)
{
	std::cout << "Here is your collection:\n" << std::endl;
	for (int i = 0; i < ct; i++)
	{
		std::cout << c[i].name << "\t" << c[i].year << std::endl;
	}
}